/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ozdev.comun.testmarsh;

import com.ozdev.comun.model.Usuario;
import java.io.IOException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;

/**
 *
 * @author rberrezueta
 */
public class UserMain {
    
public static void main(String[] args) throws JAXBException, IOException {
 
    Usuario user = new Usuario();
    user.setId(1);
    user.setPassword("lalal");
    user.setEnabled(true);
    user.setEmail("lala@lala.com");
    user.setUsername("username");
    user.setFecha_crea("now()");
    user.setFecha_mod("now()");
    
    // create JAXB context and instantiate marshaller
    JAXBContext context = JAXBContext.newInstance(Usuario.class);
    Marshaller m = context.createMarshaller();
    m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);

    // Write to System.out
    m.marshal(user, System.out);     
    
}    
}
